import { authAxios } from '@/api/auth';

// 添加学生
export function addStudent(studentData) {
    return authAxios.post('/auth/register', {
        ...studentData,
        role: 'STUDENT'
    });
}

// 获取关联学生列表
export function getRelatedStudents() {
    return authAxios.get('/v1/admin/teacher/students');
}

// 获取学生论文列表
export function getStudentPapers(params) {
    return authAxios.get('/v1/admin/teacher/papers', { params });
}

// 审核论文
export function auditPaper(paperId, data) {
    return authAxios.post(`/v1/admin/teacher/papers/${paperId}/audit`, data);
}

// 获取审核记录
export function getAuditRecords(params) {
    return authAxios.get('/v1/admin/teacher/audit-records', { params });
}

// 修改学生信息
export function updateStudentInfo(studentId, data) {
    return authAxios.put(`/v1/admin/teacher/students/${studentId}`, data);
}

// 解除学生关联
export function removeStudentRelation(studentId) {
    return authAxios.delete(`/v1/admin/teacher/students/${studentId}`);
}
